import requests
import random
import time
# 目标URL
word_url = "https://site.gxyunyun.com/word-v1/web"
msg_pool = {}

def GenerateReply(msg):
    reply = '你让我想想怎么回复你个小逼崽子'
    # 发送GET请求
    response = requests.get(word_url)

    # 检查请求是否成功
    if response.status_code == 200:
        # 将响应内容转换为Python对象
        data = response.json()
        reply = data['data']
    else:
        print(f"请求失败，状态码：{response.status_code}")
    return reply;

def TheMsgIsReply(text):
    """检查并添加消息到池，避免重复处理
    
    Args:
        text: 待检查的新消息文本
    
    Returns:
        bool: 是否为新消息（True=新消息已添加，False=已存在）
    """
    if text not in msg_pool
        msg_pool.append(text)
        return True
    return False

def WaitStepTime():
    time.sleep(random.uniform(0.1, 0.5))
    return 
def WaitShortTime():
    time.sleep(random.uniform(0.7, 4))
    return 
def WaitMiddleTime():
    time.sleep(random.uniform(2, 5))
    return 
def WaitLongTime():
    time.sleep(random.uniform(4, 15))
    return 